﻿using scripts.net;

namespace scripts.proto
{
    //查询战绩
    public class GetAchieveMsg : BaseMsg
    {
        public GetAchieveMsg()
        {
            protoName = "GetAchieveMsg";
        }

        //服务端回
        public int win = 0;
        public int lost = 0;
        public int kill = 0;
        public int death = 0;
        public float kd = 0.0f;
    }

    //房间信息
    [System.Serializable]
    public class RoomInfo
    {
        public int id = 0; //房间id
        public int count = 0; //人数
        public int status = 0; //状态0-准备中 1-战斗中
    }

    //请求房间列表
    public class GetRoomListMsg : BaseMsg
    {
        public GetRoomListMsg()
        {
            protoName = "GetRoomListMsg";
        }

        //服务端回
        public RoomInfo[] rooms;
    }

    //创建房间
    public class CreateRoomMsg : BaseMsg
    {
        public CreateRoomMsg()
        {
            protoName = "CreateRoomMsg";
        }

        //服务端回
        public int result = 0;
    }

    //进入房间
    public class EnterRoomMsg : BaseMsg
    {
        public EnterRoomMsg()
        {
            protoName = "EnterRoomMsg";
        }

        //客户端发
        public int id = 0;

        //服务端回
        public int result = 0;
    }


    //玩家信息
    [System.Serializable]
    public class PlayerInfo
    {
        public string id = ""; //账号
        public int camp = 0; //阵营
        public int win = 0; //胜利数
        public int lost = 0; //失败数
        public int isOwner = 0; //是否是房主
    }

    //获取房间信息
    public class GetRoomInfoMsg : BaseMsg
    {
        public GetRoomInfoMsg()
        {
            protoName = "GetRoomInfoMsg";
        }

        //服务端回
        public PlayerInfo[] players;
    }

    //离开房间
    public class LeaveRoomMsg : BaseMsg
    {
        public LeaveRoomMsg()
        {
            protoName = "LeaveRoomMsg";
        }

        //服务端回
        public int result = 0;
    }

    //开战
    public class StartBattleMsg : BaseMsg
    {
        public StartBattleMsg()
        {
            protoName = "StartBattleMsg";
        }

        //服务端回
        public int result = 0;
    }
}